<!--
 Copyright (c) 2016,2017,2018,2019,2020,2021,2022 Klaus Landsdorf (http://node-red.plus/)
 Copyright 2016 - Jason D. Harper, Argonne National Laboratory
 Copyright 2015,2016 - Mika Karaila, Valmet Automation Inc.
 All rights reserved.
 node-red-contrib-modbus

 @author <a href="mailto:klaus.landsdorf@bianco-royal.de">Klaus Landsdorf</a> (Bianco Royal)
-->
<script type="text/javascript">
  RED.nodes.registerType('modbus-response', {
    category: 'modbus',
    color: '#E9967A',
    defaults: {
      name: {value: ''},
      registerShowMax: {value: 20, validate: RED.validators.number()}
    },
    inputs: 1,
    outputs: 0,
    align: "right",
    icon: 'modbus.png',
    paletteLabel: 'Modbus-Response',
    label: function () {
      return this.name || 'Modbus Response'
    }
  })
</script>


<script type="text/x-red" data-template-name="modbus-response">
    <div class="form-row">
        <label for="node-input-name"><i class="icon-tag"></i> <span data-i18n="node-red:common.label.name"></span></label>
        <input type="text" id="node-input-name" placeholder="Name">
    </div>
    <div class="form-row">
        <label for="node-input-registerShowMax"><i class="fa fa-th"></i> <span data-i18n="modbus-contrib.label.registerShowMax"></span></label>
        <input type="text" id="node-input-registerShowMax" placeholder="register to show max.">
    </div>

</script>


<script type="text/x-red" data-help-name="modbus-response">
    <p>Node to show response or response length from second output of Modbus Read/Write/Getter nodes in status.</p>
    <p>Show-Max-Register is the border from where the node only shows, how many data are in response array.</p>
    <p>That node is just to get some information and it is not necessary to work with Modbus Read/Write/Getter nodes.</p>
    <p>If the Modbus Read/Write/Getter sends data very quick, don't use this node to much, please.</p>

</script>
